package br.com.rpteixeira.persistence;

import java.util.List;

import javax.persistence.PersistenceException;

import br.com.rpteixeira.entity.Entity;


public interface DAO<ENTITY extends Entity> {
   public ENTITY insert(ENTITY entity)throws PersistenceException;
   public ENTITY update(ENTITY entity)throws PersistenceException;
   public void delete(ENTITY entity)throws PersistenceException;
   public ENTITY findById(ENTITY entity) throws PersistenceException;
   public List<ENTITY> find(String queryName,Object[] args)throws PersistenceException;
   public List<ENTITY>findAll(String queryName)throws PersistenceException;
   public List<ENTITY> findNavite(String queryName) throws PersistenceException;
   public List<ENTITY> findNavite(String queryName,Object[] args) throws PersistenceException;
   public List<ENTITY> findByNamedQuery(String queryName, Object[] args)throws PersistenceException; 
}
